﻿Imports System.Runtime.InteropServices

<GuidAttribute("9B5A4AC0-30CC-438F-8840-F1CEAA86F25C"), InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)>
Public Interface iClient
  Function Authenticate(Optional ByVal user As String = "user", Optional ByVal pass As String = "pass") As Boolean
  Function Revoke() As Boolean
  Function SetValue(ByVal Name As String, ByVal Value As String) As Boolean
  Function GetValue(ByVal Name As String) As String
  Function DelValue(ByVal Name As String) As Boolean
  Function Connect(Optional ByVal server As String = "localhost", Optional ByVal port As Integer = 12345, Optional ByVal ServiceName As String = "SNCS") As Boolean
  Function GetDB(ByVal Name As String, Optional ByVal CreateIfNotExist As Boolean = True) As String
  Function DeleteDB(ByVal Name As String) As Boolean
  Function ListDBs(Optional ByVal Identifier As String = "") As List(Of String)
  Function ListValues(Optional ByVal Name As String = "") As Dictionary(Of String, String)
  Function ListPrivateValues(ByVal Identifier As String, Optional ByVal Name As String = "") As Dictionary(Of String, String)
  Function SetPrivateValue(ByVal Identifier As String, ByVal Name As String, ByVal Value As String) As Boolean
  Function GetPrivateValue(ByVal Identifier As String, ByVal Name As String) As String
  Function DelPrivateValue(ByVal Identifier As String, ByVal Name As String) As Boolean
  'Function BSPGET() As Integer
  'Function BSPSET() As Integer
  'Function BSPCON() As Integer
  Property Name As String
  Property Value As String
  Property DB As String
  Property Server As String
  Property Port As Integer
  ReadOnly Property Connected As Boolean
  ReadOnly Property ConnectedServer As String
  ReadOnly Property ConnectedServerPort As Integer
  Sub Close()
End Interface
